<?php
/**
 * Created by PhpStorm
 * User: shen.zk
 * Date: 2023/8/27
 * Time: 11:27
 * Comment: ''
 */

namespace App\Repository;

class BaseRepo
{
    protected static $instance = [];
    public function __construct(){}
    public function __clone(){}

    public static function getInstance()
    {
        if((static::$instance[static::class] ?? []) instanceof static) {
            return static::$instance[static::class];
        }
        return static::$instance[static::class] = new static();
    }
}
